import java.util.Scanner;
public class Lab04Task05 {
	public static void main(String[] args) {
	Scanner kb=new Scanner(System.in);
	String str1,str2;
	int i1,i2;
	System.out.println("Please enter a string:");
	str1=kb.nextLine();
	System.out.println("Please enter two integer indexes:[0 - 16]:");
	i1=kb.nextInt();
	i2=kb.nextInt();
	str2=str1.substring(0, i1)+str1.charAt(i2)+str1.substring(i1+1,i2)+str1.charAt(i1)+str1.substring(i2+1);
	System.out.println(str2);
}
}